{
  "title": "CFRFxABookmark",
  "description": "A message shown in the bookmark panel when user adds or edits a bookmark",
  "version": "1.0.0",
  "type": "object",
  "definitions": {
    "plainText": {
      "description": "Plain text (no HTML allowed)",
      "type": "string"
    },
    "richText": {
      "description": "Text with HTML subset allowed: i, b, u, strong, em, br",
      "type": "string"
    },
    "link_url": {
      "description": "Target for links or buttons",
      "type": "string",
      "format": "uri"
    }
  },
  "properties": {
    "title": {
      "description": "Shown at the top of the message in the largest font size.",
      "oneOf": [
        {
          "allOf": [
            {"$ref": "#/definitions/richText"},
            {"description": "Message to be shown"}
          ]
        },
        {
          "type": "object",
          "properties": {
            "string_id": {
              "type": "string",
              "description": "Fluent id of localized string"
            }
          },
          "required": ["string_id"]
        }
      ]
    },
    "text": {
      "description": "Longest part of the message, below the title, provides explanation.",
      "oneOf": [
        {
          "allOf": [
            {"$ref": "#/definitions/richText"},
            {"description": "Message to be shown"}
          ]
        },
        {
          "type": "object",
          "properties": {
            "string_id": {
              "type": "string",
              "description": "Fluent id of localized string"
            }
          },
          "required": ["string_id"]
        }
      ]
    },
    "cta": {
      "description": "Link shown at the bottom of the message, call to action",
      "oneOf": [
        {
          "allOf": [
            {"$ref": "#/definitions/richText"},
            {"description": "Message to be shown"}
          ]
        },
        {
          "type": "object",
          "properties": {
            "string_id": {
              "type": "string",
              "description": "Fluent id of localized string"
            }
          },
          "required": ["string_id"]
        }
      ]
    },
    "info_icon": {
      "type": "object",
      "description": "The small icon displayed in the top right corner of the panel. Not configurable, only the tooltip text." ,
      "properties": {
        "tooltiptext": {
          "oneOf": [
            {
              "allOf": [
                {"$ref": "#/definitions/plainText"},
                {"description": "Message to be shown"}
              ]
            },
            {
              "type": "object",
              "properties": {
                "string_id": {
                  "type": "string",
                  "description": "Fluent id of localized string"
                }
              },
              "required": ["string_id"]
            }
          ]
        }
      },
      "required": ["tooltiptext"]
    },
    "close_button": {
      "type": "object",
      "description": "The small dissmiss icon displayed in the top right corner of the message. Not configurable, only the tooltip text." ,
      "properties": {
        "tooltiptext": {
          "oneOf": [
            {
              "allOf": [
                {"$ref": "#/definitions/plainText"},
                {"description": "Message to be shown"}
              ]
            },
            {
              "type": "object",
              "properties": {
                "string_id": {
                  "type": "string",
                  "description": "Fluent id of localized string"
                }
              },
              "required": ["string_id"]
            }
          ]
        }
      },
      "required": ["tooltiptext"]
    },
    "color": {
      "description": "Message text color",
      "allOf": [
        {"$ref": "#/definitions/plainText"},
        {"description": "Valid CSS color"}
      ]
    },
    "background_color_1": {
      "description": "Configurable background color through CSS gradient",
      "allOf": [
        {"$ref": "#/definitions/plainText"},
        {"description": "Valid CSS color"}
      ]
    },
    "background_color_2": {
      "description": "Configurable background color through CSS gradient",
      "allOf": [
        {"$ref": "#/definitions/plainText"},
        {"description": "Valid CSS color"}
      ]
    }
  },
  "additionalProperties": false,
  "required": ["title", "text", "cta", "info_icon"]
}
